<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
	  xmlns:n="http://typo3.org/ns/GeorgRinger/News/ViewHelpers"
	  data-namespace-typo3-fluid="true">

<f:if condition="{newsItem.alternativeTitle}">
	<f:then><n:metaTag property="og:title" content="{newsItem.alternativeTitle}" /></f:then>
	<f:else><n:metaTag property="og:title" content="{newsItem.title}" /></f:else>
</f:if>
<n:metaTag property="og:type" content="{settings.opengraph.type}" />
<n:metaTag property="og:url" content="" useCurrentDomain="1" />
<n:metaTag property="og:site_name" content="{settings.opengraph.site_name}" />
<f:if condition="{newsItem.firstPreview}">
	<n:metaTag
		property="og:image"
		content="{f:uri.image(src:'{newsItem.firstPreview.uid}', treatIdAsReference:1, maxWidth:'500')}"
		forceAbsoluteUrl="1" />
	<n:metaTag property="og:image:width" content="{n:imageSize(property:'width')}" />
	<n:metaTag property="og:image:height" content="{n:imageSize(property:'height')}" />
</f:if>

<f:if condition="{newsItem.description}">
	<f:then>
		<n:metaTag name="description" content="{newsItem.description}" />
		<n:metaTag property="og:description" content="{newsItem.description}" />
	</f:then>
	<f:else>
		<n:metaTag name="description" content="{newsItem.teaser -> f:format.stripTags()}" />
		<n:metaTag property="og:description" content="{newsItem.teaser -> f:format.stripTags()}" />
	</f:else>
</f:if>
<n:metaTag name="keywords" content="{newsItem.keywords}" />
<n:metaTag property="fb:admins" content="{settings.opengraph.admins}" />
<n:metaTag property="og:email" content="{settings.opengraph.email}" />
<n:metaTag property="og:phone_number" content="{settings.opengraph.phone_number}" />
<n:metaTag property="og:fax_number" content="{settings.opengraph.fax_number}" />
<n:metaTag property="og:latitude" content="{settings.opengraph.latitude}" />
<n:metaTag property="og:longitude" content="{settings.opengraph.longitude}" />
<n:metaTag property="og:street-address" content="{settings.opengraph.street-address}" />
<n:metaTag property="og:locality" content="{settings.opengraph.locality}" />
<n:metaTag property="og:locale" content="{settings.opengraph.locale}" />
<n:metaTag property="og:region" content="{settings.opengraph.region}" />
<n:metaTag property="og:postal-code" content="{settings.opengraph.postal-code}" />
<n:metaTag property="og:country-name" content="{settings.opengraph.country-name}" />
<f:if condition="{settings.opengraph.twitter.site}">
	<n:metaTag name="twitter:card" content="{settings.opengraph.twitter.card}" />
	<n:metaTag name="twitter:site" content="{settings.opengraph.twitter.site}" />
	<n:metaTag name="twitter:creator" content="{settings.opengraph.twitter.creator}" />
</f:if>
</html>
